package com.oba.king.sysmanager;

import javax.swing.tree.MutableTreeNode;

import com.oba.base.interfaces.ITreeItem;
import com.oba.base.service.BaseBo;

public class Module extends BaseBo implements ITreeItem {

	private Long id;
	private String name;
	private String url;
	private Module parent;
	private String serial;
	private MutableTreeNode treeNode;

	public MutableTreeNode getNode() {
		return treeNode;
	}

	public void setNode(MutableTreeNode treeNode) {
		this.treeNode = treeNode;
	}

	public String getUrl() {
		return url;
	}

	public void setUrl(String url) {
		this.url = url;
	}

	public Module getParent() {
		return parent;
	}

	public void setParent(Module parent) {
		this.parent = parent;
	}

	public String getSerial() {
		return serial;
	}

	public void setSerial(String serial) {
		this.serial = serial;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public void setName(String name) {
		this.name = name;
	}

	public Long getId() {
		return id;
	}

	public String getName() {
		return name;
	}

	public boolean isParent(ITreeItem parentItem) {
		Module parent = (Module) parentItem;
		return this.serial.startsWith(parent.getSerial());
	}

}
